package top.xana.acg.anime.model

import androidx.annotation.DrawableRes
import androidx.annotation.StringDef

/**
 * Created by xana on 2022/3/25 0025
 * Describe: cv4096@qq.com
 */

typealias HomeBanner = Banner

data class Menu(
    @DrawableRes val draw: Int,
    val menuName: String,

    val clickHandler: (() -> Unit)? = null
)

data class BannerUi(val animeList: List<Banner>)

data class CollectionUi(val animeList: List<Anime>)

data class TimelineUi(val animeList: List<List<Anime>>)


data class LabelUi(
    @Title val title: String,
    val ext: String?,
    val targetClick: (() -> Unit)? = null
) {
    companion object {
        const val TITLE_MY_SUBSCRIBE = "我的追番"
        const val TITLE_HOT_LIVING = "正在热播"
        const val TITLE_TIMELINE = "新番时间表"

        const val EXT_MORE = "更多"
    }

    @StringDef(TITLE_MY_SUBSCRIBE, TITLE_HOT_LIVING, TITLE_TIMELINE)
    annotation class Title
}

data class Episode(
    val title: String,
    val desc: String = "",
    var selected: Boolean = false
)

data class SourceUi(
    val title: String,
    val episodes: List<Episode>,
    var selected: Boolean = true
)